projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22ed96d
)
ostree_builtin_pull: consistently set free-function on refs_to_fetch
author
Simon McVittie
<smcv@debian.org>
Sun, 30 Oct 2016 14:12:02 +0000
(14:12 +0000)
committer
Atomic Bot
<atomic-devel@projectatomic.io>
Sun, 30 Oct 2016 21:37:38 +0000
(21:37 +0000)
We are relying on the GPtrArray to free its contents, but we only
give it a free-function on one code path.
Found by valgrind memcheck.
Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #559
Approved by: cgwalters
src/ostree/ot-builtin-pull.c
patch
|
blob
|
history
diff --git
a/src/ostree/ot-builtin-pull.c
b/src/ostree/ot-builtin-pull.c
index 9f48c2e074d6cff52b43ad7ea590a63a8c67c48c..52a55375fa46f1af32c5c152e4c4390e8dbcad88 100644
(file)
--- a/
src/ostree/ot-builtin-pull.c
+++ b/
src/ostree/ot-builtin-pull.c
@@
-198,7
+198,7
@@
ostree_builtin_pull (int argc, char **argv, GCancellable *cancellable, GError **
else
{
char *ref_to_fetch;
- refs_to_fetch = g_ptr_array_new
(
);
+ refs_to_fetch = g_ptr_array_new
_with_free_func (g_free
);
if (!ostree_parse_refspec (argv[1], &remote, &ref_to_fetch, error))
goto out;
/* Transfer ownership */